===================================================================== 
       Apple-II To IBM-PC Disk Transfer Program (AP2222PC.DOC)
--------------------------------------------------------------------- 
  Edited 2016 (for personal use) by: James Davis, Beagle Buddy #227.===================================================================== 

********************************************************************* 
 Apple <-> IBM-PC Disk And Sequential Text File Transferring Program
             By Clay Chang, Taipei, Taiwan, ROC OCT-1994
********************************************************************* 

1. Who will need this?

   Those who want to transfer their Apple-II disks to IBM-PC disk-
   image format (.Dsk) files but don't own a serial card.  

   Those who want to transfer their IBM-PC disk-image format (.Dsk) 
   files to Apple-II disks but don't own a serial card.  

   Those who want to transfer sequential text files either way between 
   an Apple-II and an IBM-PC but don't own a serial card.  

2. System Requirements: 

   A 48k Apple-II+ (or better) with a 16-pin game I/O socket and (at 
   least) one disk drive.

   An Apple DOS 3.3 boot disk with 48K DOS!--DO NOT use 64K DOS or 
   ProDOS.

   An IBM-PC with (at least) one 25-pin parallel interface port.

3. Function Description: 

   This version of program runs under DOS 3.3, not under ProDOS.  

   It uses IBM-PC parallel interface port #1 (PRN or LPT1) and auto 
   seeks the port address.  

   1. Apple-II disk -> IBM-PC .Dsk file: 

      Transfer a standard Apple-II DOS 3.3 RWTS readable disk (5. 25") 
      to IBM-PC in .Dsk form.  You can use the .Dsk file that comes 
      with the "APL2EM" Apple-II Emulator [APL2EM downloadable from  
      <ftp://public.asimov.net/pub/apple_II/emulators/apple_2_for_
      windows/apl2em/>] (only 35 tracks now).  (This includes almost 
      all unprotected 16-sector/track disks, including ProDOS 
      formatted disks.)  

   2. IBM-PC .Dsk file -> Apple-II disk: 


===================================================================== 
                               Page 1
===================================================================== 
       Apple-II To IBM-PC Disk Transfer Program (AP2222PC.DOC)
===================================================================== 

      Transfer a .Dsk file to a formatted Apple-II 5. 25" floppy disk.
      --(All things on the floppy will be destoryed!)--
      Then you can run the .Dsk file's programs on a real Apple-II.  

   3. Apple-II sequential text file -> IBM-PC sequential text file: 

      Transfer an Apple-II sequential text file to an IBM-PC 
      sequential text file.  You can transfer docs, programs, etc. 
      (even BINSCIIed files).  All control-characters will be 
      eliminated!  Carriage-Returns are converted to Carriage-Return/
      Line-Feed pairs (CR -> CR-LF).  

   4. IBM-PC sequential text file -> Apple-II sequential text file:

      Transfer an IBM-PC sequential text file to an Apple-II 
      sequential text file.  You can transfer BSC, EXE, and BAS files 
      to your Apple-II.  You may need to transfer to a ProDOS disk by 
      your own if you want to SCIIBIN and UnShrink it (and EXEC).  All 
      control-characters will be eliminated!  Carriage-Return/Line-
      Feed pairs are converted to Carriage-Returns (CR-LF -> CR).  

4. Limitations: 

   1. Must boot with DOS 3.3 on Apple side.  (Say, "Not for ProDOS.")  

   2. Not very fast speed!  

   3. 35-track disks only now.  

   4. Unprotected standard-RWTS-able-to-handle disks only now.  

5. Performance: 

   On my 286-12 ancient machine, it takes 7 minute to transfer a disk.  
   --(It runs apl2em much slower than real Apple-II.)--
   It WILL run much faster on a better IBM-PC, trust me!  

6. Operating method: 

   Prevent damaging important data, please use backup disks to work!  

   Apple side:

      Transfer the AP2222PC.Dsk to an Apple-II disk according to the 
      QUICK start INstructions (QUICKIN.DOC)

      After, boot with DOS 3.3, insert AP2222PC disk and "RUN WORK"

===================================================================== 
                               Page 2
===================================================================== 
       Apple-II To IBM-PC Disk Transfer Program (AP2222PC.DOC)
===================================================================== 

      Every time you re-run the program, you must insert the disk 
      containing the files.--(It will BLOAD subroutines each RUN.)

   IBM-PC side:

      "AP2222PC -<option> <[drive:][path][filename]>"

      where <option> is one of following:

         1   Apple -> IBM-PC disk transfer.
         2   IBM-PC -> Apple disk transfer.
         3   Apple -> IBM-PC text file transfer.
         4   IBM-PC -> Apple text file transfer.

         <[drive:][path][filename]>
             Specifies the drive, directory, and/or filename.

      Examples: "AP2222PC -1 Disk6a.Dsk"
                "AP2222PC -2 AP2222PC.Dsk"
                "AP2222PC -3 C:/Docs/Apple.txt"
                "AP2222PC -4 C:/Docs/Apple.txt"

   NOTICE: Follow instructions on both screens to press keys to work.

7. Technical Data (simple): 

   [See: Interface Cable Line Connection Diagrams (LINECONN.DOC)]

   Apple Game I/O Port: 

      3 one digit inputs (PB0~2).
      1 strobe output.  (Could be used with a flip-flop to get a 
        constant voltage signal; e.g. 74LS74).
      4 one digit outputs (AN0~3).
      4 analogue inputs (GC0~3).

   IBM-PC Parallel Port: 

      Some multi I/O cards permit parallel port bidirection data 
      transmission.

      If your port address is $378, then:

      $378 is data out port (usually outout only)

         bit   7   6   5   4   3   2   1   0
         pin   9   8   7   6   5   4   3   2

===================================================================== 
                               Page 3
===================================================================== 
       Apple-II To IBM-PC Disk Transfer Program (AP2222PC.DOC)
===================================================================== 

      $379 is status port (input only)

         bit    7   6   5   4   3   2   1   0
         pin   11  10  12  13  15   x   x   x

      You can use MFT to check your parallel port address.

   Apple printer card (for parallel printers): 

      As long as you grounded pin 2 and pin 20 (busy and GND), every 
      key stroke (or STA $C090) will send data to pin 3, 5, 7, 9, 11, 
      13, 15, 17; and auto send a strobe signal at pin 1; busy could 
      be an input handshake; and strobe could be an output handshake.

8. Using the subroutine: 

   Those codes with source are inside AP2222PC.Dsk: 

   atpdsk.asm located $9200, transfers disks from Apple-II to IBM-PC.
   ptadsk.asm located $9300, transfers disks from IBM-PC to Apple-II.
   file.asm   located $0300, has 2 subroutines for using game input & 
                             output (I/O):

               3 bits once if data is 12345678
               then Apple out is 123 456 780 order (IBM-PC in)
                    Apple in  is 012 345 678 order (IBM-PC out)

   $9500~$95FF is buffer for one sector I/O
   $07 stores checksum
   $08 stores data read/write

9. Concepts dealed: 

   General: 

      Parallel data transmission, handshakes I/O, text file structure, 
      checksum

   Apple side: 

      Game I/O, RWTS, assembly, text file r/w 

   IBM-PC side:

      Parallel port I/O, block and sequential file, command line tail 
      memory allocate, bios data seeking, DOS file handler, 
      F-PC & TCOM

===================================================================== 
                               Page 4
===================================================================== 
       Apple-II To IBM-PC Disk Transfer Program (AP2222PC.DOC)
===================================================================== 

10. No responsibility & about copyrights: 

   The author will not be responsible for any damage or any other 
   consequences of using this program; don't try to find me if any 
   disk is ruined.  

   This program is virus-free at the time the author released it.  

   You can freely copy and distribute this archive as long as the 
   content isn't changed.  You can't sell this program or earn money 
   with this program.  

11. Thanks to: 

   The creators of Apple-II, DOS 3.3 and ProDOS; 
   The creator of F-PC and TCOM; 
   And, all of you using this program.  

12. Future plans: 

   Duo to study works, next reversion time will be summer of 1995.

   Disk <-> .Dsk operation under ProDOS
      (use MLI call, .Dsk file require interleave).  

   Sequential text file transfer under ProDOS
      (use bload & bsave and more assembly).  

   Modulize, optionally use 4 bit (with strobe) or Apple printer card 
   and IBM-PC 2-way parallel port.

   Read/write disk in nibble form, handle protected disks.  (How?  I 
   do not know yet.)

13. Files contained in the zip archive: 

   AP2222PC.SEQ   Source code of AP2222PC.com; 
                  Must compile with newest TCOM.
   AP2222PC.COM   IBM-PC side program.
   AP2222PC.DSK   Apple side program in disk-image form;
                  includes assembly codes & sources, & basic program.
   AP2222PC.DOC   This document.
   README.1ST     What you should read 1st.
   LINECONN.DOC   Line connection diagrams documentation.
   LOADER.ASM     Apple side code to download all programs 
                  (IBM-PC .Dsk -> Apple disk).
   QUICKIN.DOC    Quick start instructions.

===================================================================== 
                               Page 5
===================================================================== 
       Apple-II To IBM-PC Disk Transfer Program (AP2222PC.DOC)
===================================================================== 

14. Feedback to the author: 

   You don't have to mail $$ to me, but please e-mail me back about 
   the bugs, performance and your feeling about this program.

   Clay Chang, 
   Mechanical Engineering Dept., 
   National Central University, 
   320 ChungLi, Taiwan, ROC

   u332302@twncu865.ncu.edu.tw <-<< Please e-mail to this place! :)
   u339589@sparc20.ncu.edu.tw  <-<< (before Sep-1995)

===================================================================== 


































===================================================================== 
                               Page 6
